package ch7;

import java.util.InputMismatchException;
import java.util.Scanner;

//只有try和Finally
//finally块，无论如何都执行
public class Calc5 {

	public static void main(String[] args) {
		System.out.println("请输入被除数：");
		Scanner in = new Scanner(System.in);
		try {
			int a = in.nextInt();
			System.out.println("输入除数：");
			int b = in.nextInt();

			int shang = a / b;
			System.out.println(a + "/" + b + "=" + shang);

		} finally {
			System.out.println("计算完成");
		}

	}

}
